use "$datapath/004_het2_results_wagebefore_cog_simple_K50_LL.dta", clear
keep b*_HetSymm se*_HetSymm truncation
gen ub_HetSymm = b_HetSymm+1.645*se_HetSymm
gen lb_HetSymm = b_HetSymm-1.645*se_HetSymm

gen ubA_HetSymm = bA_HetSymm+1.645*seA_HetSymm
gen lbA_HetSymm = bA_HetSymm-1.645*seA_HetSymm

gen ubL_HetSymm = bL_HetSymm+1.645*seL_HetSymm
gen lbL_HetSymm = bL_HetSymm-1.645*seL_HetSymm

gen ubAL_HetSymm = bAL_HetSymm+1.645*seAL_HetSymm
gen lbAL_HetSymm = bAL_HetSymm-1.645*seAL_HetSymm

gen ubW_HetSymm = bW_HetSymm+1.645*seW_HetSymm
gen lbW_HetSymm = bW_HetSymm-1.645*seW_HetSymm

gen ubWL_HetSymm = bWL_HetSymm+1.645*seWL_HetSymm
gen lbWL_HetSymm = bWL_HetSymm-1.645*seWL_HetSymm

local xtitle="L{sub:max}"
local ytitle="Estimate of {&beta}"
local ytitle_A="Estimate of {&beta}{sub:A}"
local ytitle_L="Estimate of {&beta}{sub:L}"
local ytitle_AL="Estimate of {&beta}{sub:AL}"
local ytitle_W="Estimate of {&beta}{sub:W}"
local ytitle_WL="Estimate of {&beta}{sub:WL}"
local yrange="-1 .5"
local yrange_A="-2.5 1.5"
local yrange_W="-2.5 1.5"
local yrange_L="-.1 .1"
local yrange_AL="-.1 .1"
local yrange_WL="0 .2"
gen zero=0
keep if truncation>=70
**********************************************************************************
* PLOTS
**********************************************************************************

*******
twoway (rarea lbA_HetSymm ubA_HetSymm truncation, color(gs10%50)) || ///
		(line bA_HetSymm truncation, lcolor(black) ) || (line zero truncation, lcolor(black) lpattern(dash)), scheme(s1mono) legend(off) ///
					xlabel(500(500)3000) ytitle(`ytitle_A') ylabel(-2.5(.5)1.5) xtitle(`xtitle', size(large)) title("") note("") yscale(range(`yrange_A'))
graph export "$figpath/betaA_lin50_het2.pdf", replace		
*******
twoway (rarea lbW_HetSymm ubW_HetSymm truncation, color(gs10%50)) || ///
		(line bW_HetSymm truncation, lcolor(black) ) || (line zero truncation, lcolor(black) lpattern(dash)), scheme(s1mono) legend(off) ///
					xlabel(500(500)3000) ytitle(`ytitle_W') ylabel(-2.5(.5)1.5) xtitle(`xtitle', size(large)) title("") note("") yscale(range(`yrange_W'))
graph export "$figpath/betaW_lin50_het2.pdf", replace		
*******
